<?php
		require('config.php');
        $user_id=$_REQUEST['user_id'];
		$sql="select * from `".$oto."_cart` where `userId`='$user_id'";
		$result=$db->query($sql);
		while($row=$result->fetch_assoc()){
			$goods[]=$row;//将取得的所有数据赋值给person_info数组
		}
		if(!isset($goods))
		{
			$num=0;
		}
		else
		{
			$num=count($goods);
		}
		echo json_encode($num);
?>